<template>
   <div class="container">
        <div style="font-size:18px;text-align:left;">关于21克</div>
        <hr><br>
        <umeditor v-bind:value="detail" v-bind:config=config  v-on:input="listenEdi" ></umeditor>
        <el-button type="primary" @click="saveQue" class="btn">保存</el-button>
   </div>
</template>
<script>
import umeditor from '../common/UMeditor.vue';
export default {
  components: {
       // quillEditor,                              // 声明组件quillEditor
        umeditor
  },
  data() {
      return {
          detail:"",
          config: {
            initialFrameWidth: null,
            initialFrameHeight: 320,
          },
      }
  },
  mounted(){
    this.GEt_ABOut()
  },
   methods: {
     GEt_ABOut(){
         var self=this
         self.myajax("/market/searchAll",{},function(res){
              console.log(res);
             if(res.data==""){
              
             }else{
                 self.detail=res.data[0].content

             }
         });
     },
     saveQue(){
        var self=this
        var  data={
            content:this.detail,
            id:'345'
        } 
        self.myajax("/market/update",data,function(res){
              console.log(res);
             if(res.code==1000){
              self.$notify({title: '提示',message: "修改成功",type: 'success'})
             }else{
                 self.detail=res.data
             }
         });
     },
     listenEdi(val){
          this.detail=val.content;
    },
   }
}
</script>
<style  scoped>
.btn{
     margin-top:40px;
    float: right;
 }
</style>


